<template>
  <header>
    <h1>
        <img src="@/assets/images/logo.png" alt="">
    </h1>
    <div class="search" @click="goSearch">
        <i class="iconfont icon-fangdajing"></i>
        <span>搜你喜欢的</span>
    </div>
    <div class="kefu">
        <i class="iconfont icon-kefu"></i>
    </div>
 </header>
</template>

<script>

 
export default {
    methods:{
        goSearch(){
            this.$router.push('/SearcH')
        }
    }
}
</script>

<style scoped>
/* 最外层样式 */
header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 1.6rem;
  /* 背景颜色 */
  background-color: #a52a2a;
}
/* logo */
header h1 {
  padding: 0 0.266666rem;
}
header h1 img {
  width: 2rem;
  height: 1rem;
}
/* 搜索框 */
.search {
  display: flex;
  align-items: center;
  width: 6rem;
  height: 0.8rem;
  background-color: aliceblue;
  border-radius: 12px;
}
/* 搜索框放大镜图片 */
.search i {
  padding: 0 0.16rem;
  color: #ccc;
}
/* 搜索框内文字 */
.search span {
  font-size: 0.373333rem;
  color: #ccc;
}
/* 客服 */
.kefu i {
  font-size: 0.625rem;
  color: #fff;
}
</style>

header{
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 1.6rem;
    background-color: #b0352f;
}
header h1 img{
    padding-right: 0.266666rem;
    width: 2.66666rem;
    height: 1.33333rem;
}
.search{
    display: flex;
    align-items: center;
    width: 5rem;
    height: 0.8rem;
    background-color: #FFFFFF;
    border-radius: 12px;
}
.search i{
    padding: 0 0.16rem;
    color: #ccc;
}
.search span{
    font-size: 14px;
    color: #ccc;
}
.kefu i{
    font-size:0.96rem;
    color:#ffffff;
}
</style>